package com.yanqu.road.entity.monopolymarket.resgrab;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

/**
 * @Description 资源争夺战 完成采集的记录  (只记录玩家被抢夺 和 正常结束的记录)
 * @Author cwq
 * @Data 2021/9/3 9:35
 */
@FieldTypeAnnotation(tableName = "t_c_monopolymarket_resgrab_finish")
public class MonopolyMarketResGrabFinishData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    private long id;

    @FieldTypeAnnotation(desc = "资源类型")
    private byte type;

    @FieldTypeAnnotation(desc = "占领玩家")
    private long userId;

    @FieldTypeAnnotation(desc = "据点id")
    private int posIndex;

    @FieldTypeAnnotation(desc = "地图边长（显示用）")
    private int side;

    @FieldTypeAnnotation(desc = "等级")
    private byte level;

    @FieldTypeAnnotation(desc = "抢夺玩家名称")
    private String robName = "";

    @FieldTypeAnnotation(desc = "采集玩家派遣的对象id")
    private String objectStr;

    @FieldTypeAnnotation(desc = "战斗鼓舞加成")
    private int buffValues;

    @FieldTypeAnnotation(desc = "从采集开始，本次采集总时长")
    private int rewardTime;

    @FieldTypeAnnotation(desc = "该记录采集数量")
    private int rewardNum;

    @FieldTypeAnnotation(desc = "从采集开始，本次采集总数量")
    private int totalRewardNum;

    @FieldTypeAnnotation(desc = "本条记录开始的计算时间")
    private int startTime;

    @FieldTypeAnnotation(desc = "本条记录的总时长")
    private int totalTime;

    @FieldTypeAnnotation(desc = "是否领取奖励")
    private boolean isReceive;

    @FieldTypeAnnotation(desc = "奖励值是否加入过排行榜，rewardNum > 0才需要同步 如果rewardNum 默认未true")
    private boolean isJoinRank;

    @FieldTypeAnnotation(desc = "时间 奖励保留30天，过期不加载)")
    private int time;

    public long getId() {
        return id;
    }
    public void setId(long id) {
        if (this.id != id) {
            this.id = id;
            setOp(DataStatus.Update);
        }
    }

    public byte getType() {
        return type;
    }
    public void setType(byte type) {
        if (this.type != type) {
            this.type = type;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getPosIndex() {
        return posIndex;
    }
    public void setPosIndex(int posIndex) {
        if (this.posIndex != posIndex) {
            this.posIndex = posIndex;
            setOp(DataStatus.Update);
        }
    }

    public int getSide() {
        return side;
    }
    public void setSide(int side) {
        if (this.side != side) {
            this.side = side;
            setOp(DataStatus.Update);
        }
    }

    public byte getLevel() {
        return level;
    }
    public void setLevel(byte level) {
        if (this.level != level) {
            this.level = level;
            setOp(DataStatus.Update);
        }
    }

    public String getRobName() {
        return robName;
    }
    public void setRobName(String robName) {
        if (robName == null){
            return;
        }
        if (this.robName == null || !this.robName.equals(robName)) {
            this.robName = robName;
            setOp(DataStatus.Update);
        }
    }

    public String getObjectStr() {
        return objectStr;
    }
    public void setObjectStr(String objectStr) {
        if (objectStr == null){
            return;
        }
        if (this.objectStr == null || !this.objectStr.equals(objectStr)) {
            this.objectStr = objectStr;
            setOp(DataStatus.Update);
        }
    }

    public int getBuffValues() {
        return buffValues;
    }
    public void setBuffValues(int buffValues) {
        if (this.buffValues != buffValues) {
            this.buffValues = buffValues;
            setOp(DataStatus.Update);
        }
    }

    public int getRewardTime() {
        return rewardTime;
    }
    public void setRewardTime(int rewardTime) {
        if (this.rewardTime != rewardTime) {
            this.rewardTime = rewardTime;
            setOp(DataStatus.Update);
        }
    }

    public int getRewardNum() {
        return rewardNum;
    }
    public void setRewardNum(int rewardNum) {
        if (this.rewardNum != rewardNum) {
            this.rewardNum = rewardNum;
            setOp(DataStatus.Update);
        }
    }

    public int getTotalRewardNum() {
        return totalRewardNum;
    }
    public void setTotalRewardNum(int totalRewardNum) {
        if (this.totalRewardNum != totalRewardNum) {
            this.totalRewardNum = totalRewardNum;
            setOp(DataStatus.Update);
        }
    }

    public int getStartTime() {
        return startTime;
    }

    public void setStartTime(int startTime) {
        if (this.startTime != startTime) {
            this.startTime = startTime;
            setOp(DataStatus.Update);
        }
    }

    public int getTotalTime() {
        return totalTime;
    }

    public void setTotalTime(int totalTime) {
        if (this.totalTime != totalTime) {
            this.totalTime = totalTime;
            setOp(DataStatus.Update);
        }
    }

    public boolean getIsReceive() {
        return isReceive;
    }
    public void setIsReceive(boolean isReceive) {
        if (this.isReceive != isReceive) {
            this.isReceive = isReceive;
            setOp(DataStatus.Update);
        }
    }

    public int getTime() {
        return time;
    }
    public void setTime(int time) {
        if (this.time != time) {
            this.time = time;
            setOp(DataStatus.Update);
        }
    }

    public boolean getIsJoinRank() {
        return isJoinRank;
    }

    public void setIsJoinRank(boolean isJoinRank) {
        if (this.isJoinRank != isJoinRank) {
            this.isJoinRank = isJoinRank;
            setOp(DataStatus.Update);
        }
    }
}
